package com.study.designPattern.observer.example2;

/**
 * @Author HBZ
 * @Date 2020/7/21 11:00
 * @Description
 */
public class ObserverPattern {
    public static void main(String[] args)
    {
        AbstractSubject subject=new ConcreteSubject();
        Observer obs1=new ConcreteObserver1();
        Observer obs2=new ConcreteObserver2();
        subject.add(obs1);
        subject.add(obs2);
        subject.notifyObserver("hello");
    }
}
